// vite.config.ts
import { loadEnv } from "file:///C:/Users/%E5%93%8E%E5%93%9F%E5%96%82/Desktop/vue-qiankun/vue3-qianku-main/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Users/%E5%93%8E%E5%93%9F%E5%96%82/Desktop/vue-qiankun/vue3-qianku-main/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import AutoImport from "file:///C:/Users/%E5%93%8E%E5%93%9F%E5%96%82/Desktop/vue-qiankun/vue3-qianku-main/node_modules/unplugin-auto-import/dist/vite.js";
import Components from "file:///C:/Users/%E5%93%8E%E5%93%9F%E5%96%82/Desktop/vue-qiankun/vue3-qianku-main/node_modules/unplugin-vue-components/dist/vite.js";
import { ElementPlusResolver } from "file:///C:/Users/%E5%93%8E%E5%93%9F%E5%96%82/Desktop/vue-qiankun/vue3-qianku-main/node_modules/unplugin-vue-components/dist/resolvers.js";
import path from "path";
import vueSetupExtend from "file:///C:/Users/%E5%93%8E%E5%93%9F%E5%96%82/Desktop/vue-qiankun/vue3-qianku-main/node_modules/unplugin-vue-setup-extend-plus/dist/vite.js";
import { createSvgIconsPlugin } from "file:///C:/Users/%E5%93%8E%E5%93%9F%E5%96%82/Desktop/vue-qiankun/vue3-qianku-main/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import { viteMockServe } from "file:///C:/Users/%E5%93%8E%E5%93%9F%E5%96%82/Desktop/vue-qiankun/vue3-qianku-main/node_modules/vite-plugin-mock/dist/index.js";
var vite_config_default = ({ command, mode }) => {
  let env = loadEnv(mode, process.cwd());
  return {
    plugins: [
      vue(),
      AutoImport({
        resolvers: [ElementPlusResolver()]
      }),
      Components({
        resolvers: [ElementPlusResolver()]
      }),
      vueSetupExtend({
        enableAutoExpose: true
        // 是否自动导出
      }),
      createSvgIconsPlugin({
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        symbolId: "icon-[dir]-[name]"
      }),
      viteMockServe({
        localEnabled: command === "serve"
      })
    ],
    resolve: { alias: { "@": path.resolve("./src") } },
    // 配置别名
    css: {
      preprocessorOptions: {
        scss: {
          javascriptEnabled: true,
          additionalData: '@import "./src/styles/variable.scss";'
        }
      }
    },
    //代理跨域
    server: {
      proxy: {
        [env.VITE_APP_BASE_API]: {
          //获取数据的服务器地址设置
          target: env.VITE_SERVE,
          //需要代理跨域
          changeOrigin: true,
          //路径重写
          rewrite: (path2) => path2.replace(/^\/api/, "")
        }
      },
      port: 8080,
      // 指定启动端口
      open: true
      //启动后是否自动打开浏览器
    }
  };
};
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFxcdTU0Q0VcdTU0REZcdTU1ODJcXFxcRGVza3RvcFxcXFx2dWUtcWlhbmt1blxcXFx2dWUzLXFpYW5rdS1tYWluXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFxcdTU0Q0VcdTU0REZcdTU1ODJcXFxcRGVza3RvcFxcXFx2dWUtcWlhbmt1blxcXFx2dWUzLXFpYW5rdS1tYWluXFxcXHZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9DOi9Vc2Vycy8lRTUlOTMlOEUlRTUlOTMlOUYlRTUlOTYlODIvRGVza3RvcC92dWUtcWlhbmt1bi92dWUzLXFpYW5rdS1tYWluL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgQ29uZmlnRW52LCBVc2VyQ29uZmlnRXhwb3J0LCBsb2FkRW52IH0gZnJvbSAndml0ZSdcbmltcG9ydCB2dWUgZnJvbSAnQHZpdGVqcy9wbHVn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